home *** CD-ROM | disk | FTP | other *** search
/ Archive Magazine CD 1995 / Archive Magazine CD 1995.iso / discs / pipeline / pipedream / Documents / Custom / CF_sheets / c_DatFormE < prev    next >
Encoding:
Text File  |  1991-10-09  |  1.8 KB  |  68 lines

  1. %OP%DP0
  2. %OP%FX
  3. %OP%FY
  4. %OP%FS
  5. %OP%NDsuffixnames,c12c21
  6. %OP%NDdigit,9
  7. %OP%NDmonth_table,b1b12
  8. %OP%NDweekdays,c1c7
  9. %OP%NDdaytext,""
  10. %OP%NDdate_text,"9.10.91"
  11. %OP%NDsuffix,c21
  12. %OP%NDmonthtext,"10"
  13. %OP%NDyeartext,"91"
  14. %OP%WC2,1238,1012,1364,0,0,0,0
  15. %OP%VS3.81 Test (Oct  8 1991), Colton Software - Development, R0123 4567 8901 2345
  16. %CO:A,78,0%%V%%L%function("format_date","when","daypl","theon","dateon","suffon","ofon","monpl","yearpl","sep:text")
  17. %V%%L%if(type(@when)<>"date",result("Bad Date"),)
  18. %V%%L%set_name("yeartext",right(string(year(@when),0),@yearpl))
  19. %V%%L%set_name("month_table",b1b12)
  20. %V%%L%set_name("weekdays",c1c7)
  21. %V%%L%set_name("digit",mod(day(@when),10))
  22. %V%%L%set_name("suffixnames",c12c21)
  23. %V%%L%set_name("suffix",index(suffixnames,1,digit+1))
  24. %V%%L%if(@monpl<>-1,set_name("monthtext",mid(index(month_table,1,month(@when)),1,@monpl)),set_name("monthtext",string(month(@when),0)))
  25. %V%%L%set_name("daytext",mid(index(weekdays,1,weekday(@when)),1,@daypl))
  26. %V%%L%if(@daypl<>0,set_name("date_text",daytext),set_name("date_text",""))
  27. %V%%L%if(@theon=1,set_name("date_text",join(date_text,@sep,c9,@sep)),set_name("date_text",join(date_text,@sep)))
  28. %V%%L%if(@dateon=1,set_name("date_text",join(date_text,string(day(@when),0))),0)
  29. %V%%L%if(@suffon=1,set_name("date_text",join(date_text,suffix)),0)
  30. %V%%L%if(@ofon=1,set_name("date_text",join(date_text,@sep,c10,@sep)),set_name("date_text",join(date_text,@sep)))
  31. %V%%L%if(@monpl<>0,set_name("date_text",join(date_text,monthtext)),0)
  32. %V%%L%if(@yearpl<>0,set_name("date_text",join(date_text,@sep,yeartext)),0)
  33. %V%%L%if(left(date_text,1)=@sep,set_name("date_text",right(date_text,length(date_text)-1)),0)
  34. %V%%L%result(date_text)
  35. %CO:B,12,24%January
  36. February
  37. March
  38. April
  39. May
  40. June
  41. July
  42. August
  43. September
  44. October
  45. November
  46. December
  47. %CO:C,12,12%Sunday
  48. Monday
  49.  Tuesday
  50. Wednesday
  51. Thursday
  52. Friday
  53. Saturday
  54.  
  55. the
  56. of
  57.  
  58. th
  59. st
  60. nd
  61. rd
  62. th
  63. th
  64. th
  65. th
  66. th
  67. th
  68.